import Mock from 'mockjs'

// 引入各个模块的mock配置
import user from './user'
import equipment from './equipment'


// 设置mock请求延时
Mock.setup({
  timeout: '200-600'
})

// 在这里可以添加全局的mock配置
Mock.mock(/\/sys\/menu/,'get',(req: any,res: any) =>{
  return user.getMenuList(req,res)
});

// Mock.mock(/\/api\/admin\/login/,'post',(req: any,res: any) =>{
//   return user.getLogin(req,res)
// });

//获取用户登录以后的信息
Mock.mock(/\/user\/info/,'get',(req: any,res: any) =>{
  return user.getUserInfo(req,res)
});

//================设备管理模块=====================//
//获取分页列表
// Mock.mock(/\/api\/admin\/equipment\/list/,'get',(req: any,res: any) =>{
//   return equipment.getPageList(req,res)
// });
//新增数据接口
// Mock.mock(/\/api\/admin\/create\/equipment/,'post',(req: any,res: any) =>{
//   return equipment.addData(req,res)
// });
//修改数据接口
// Mock.mock(/\/api\/admin\/update\/equipment/,'post',(req: any,res: any) =>{
//   return equipment.updData(req,res)
// });
//报废设备
// Mock.mock(/\/api\/admin\/update\/equipment\/status/,'post',(req: any,res: any) =>{
//   return equipment.updData(req,res)
// });

export default Mock;